#!/bin/sh
''':'
experiments=${GIT_CINNABAR_EXPERIMENTS-$(git config cinnabar.experiments)}
case ",$experiments," in
*,python3,*)
  PYTHON=python3
  ;;
*)
  PYTHON=python2.7
  ;;
esac
exec $PYTHON $0 "$@"
exit 1
'''

import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__)))
sys.path.append(os.path.join(os.path.dirname(__file__), 'pythonlib'))

from cinnabar.cmd import CLI
from cinnabar.util import run


if __name__ == '__main__':
    func, args = CLI.prepare(sys.argv[1:])
    run(func, args)
